package zhtt.hibernate.user.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import zhtt.hibernate.user.entity.Organization;
import zhtt.hibernate.user.repository.OrganizationRepository;

@Service
public class OrganizationService {

    @Autowired
    private OrganizationRepository repository;

    public Organization save(Organization organization){
        repository.save(organization);
        return organization;
    }

    public Object get(Long id){
        return repository.findById(id);
    }
}
